home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ccdl150l.zip / IO / FPRINTF.C < prev    next >
C/C++ Source or Header  |  1997-06-12  |  343b  |  15 lines

  1. #include <stdio.h>
  2.  
  3. int vfprintf(FILE *stream, const char *format, void *list)
  4. {
  5.     int rv;
  6.     char buffer[10*1024];
  7.     rv = vsprintf(buffer,format,list);
  8.     if (fputs(buffer,stream) == EOF)
  9.         return 0;
  10.     return rv;
  11. }
  12. int fprintf(FILE *stream, const char *format, ...)
  13. {
  14.     return vfprintf(stream,format,((char *)&format+sizeof(char *)));
  15. }